from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QFrame, QHBoxLayout
from qfluentwidgets import SubtitleLabel, setFont

from app.serial_handler import SerialHandler


class AISSerialToolWidget(QFrame):

    def __init__(self, text: str, parent=None):
        super().__init__(parent=parent)

        # 必须给子界面设置全局唯一的对象名
        self.setObjectName(text.replace(' ', '-'))
        self.serial_handler = SerialHandler('COM3', 38400)
        self.serial_handler.open()
